<template>
  <dialog-std class="large" title="1231" src1="widget.php?act=edit&id=$0" :success="success" :commands="commands">
    <w-toggle align="between">
      <w-html>基本信息</w-html>
    </w-toggle>
    <w-vertical height="*">

      <w-grid gap="10" style="padding: 10px" :scroll-y="!true">


        <w-mediaupload name="courseCover" colspan="6" :label="{text:'上传图片'}" upload-limit="3" size-limit="100K"
          upload-src="swfupload/upload.php" thumbnail-src="aa.sp?id=$id" />


        <w-checkboxgroup colspan="6" :label="{text:'兴趣爱好', width: 100}" :required="!true">
          <w-checkbox name="checkbox" v-for="item in list" value="0" text="音乐"></w-checkbox>
        </w-checkboxgroup>

        <w-switch colspan="6" :label="{text: 'Switch'}" checked-value="1" unchecked-value="0" checked-text="开"
          unchecked-text="关" />

        <w-datepicker colspan="6" name="birth" :label="{text:'出生日期'}" :required="!true" />

        <w-text colspan="6" name="user" :label="{text:'标题'}" :model-value="textValue"/>


      </w-grid>
    </w-vertical>

  </dialog-std>
</template>

<script>
  import $ from '../../dfish.js'
  import DialogStd from '@/preload/DialogStd.vue'

  export default {
    components: {
      DialogStd
    },
    props: ['data'],
    data() {
      return {
        list: null,
        textValue: '123',
        pickBoxValue: {},
        commands: {
          save: {
            type: 'Confirm',
            text: '要保存吗',
            yes: {
              type: 'Submit',
              src: 'widget.php?act=save',
              success: (data, target) => {
                this.msg = data.data.msg
                //console.log($.dialog(this).commander)
                //$.dialog(this).commander.cmd('apply')
                $.dialog(this).commander.addVal({
                  value: '003',
                  text: 'ddd'
                })
                $.close(this)
              },
            }
          },
          save1: () => {
            console.log($.dialog(this).owncontext)
          }
        },
        msg: '',
        member: {
          userid: 11
        },
        focusTabID: '',
        tabs: [],
        res: {},
        hiddenValue: 'vdf',
        dropboxValue: '001',
        dropboxOptions: [{
            text: '全部',
            value: ''
          },
          {
            text: '音乐',
            value: '001'
          },
          {
            text: '美术',
            value: '002'
          },
          {
            text: '体育',
            value: '003'
          },
          {
            text: '体育4',
            value: '004'
          },
        ],

      }
    },
    methods: {
      checked() {
        console.log('checked')
      },
      success(res) {
        this.res = res.data
      }
    },
    mounted() {
      console.log($.vm(this).fv('user'))
      //   this.tabs = [{
      //       id: '01',
      //       text: '111',
      //       tmpl: 'task/HelloView'
      //     },
      //     {
      //       id: '02',
      //       text: '222',
      //       tmpl: 'task/WorldView'
      //     },
      //     {
      //       id: '03',
      //       text: '333',
      //       tmpl: 'task/GoldView'
      //     }
      //   ]
    }

  }
</script>

<style>
</style>
